<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" rel="stylesheet">
    <style>
        .account {
            width: 400px;
            margin-top: 30px;
            margin-left: auto;
            margin-right: auto;
            border: 1px solid #f0f0f0;
            padding: 10px 30px 30px 30px;
            -webkit-box-shadow: 5px 10px 10px rgba(0, 0, 0, .05);
            box-shadow: 5px 10px 10px rgba(0, 0, 0, .05);
        }
        .account .title{
            font-size: 25px;
            font-weight: bold;
            text-align: center;
        }
        .account .form-group{
            margin-bottom: 20px;
        }
    </style>
</head>

<body>
<div class="account">
    <div class="title">用户注册</div>
    <form id="form" method="POST" novalidate>
        {% csrf_token %}
        {% for field in form %}
            {% if field.name == 'code' %}
                <div class="form-group">
                    <label for="{{ field.id_for_label }}">{{ field.label }}</label>
                    <div class="clearfix">
                        <div class="col-md-6" >{{ field }}</div>
                        <div class="col-md-6" ><input type="button" class="btn btn-default" value="点击获取验证码"></div>
                    </div>
                </div>
            {% else %}
                <div class="form-group">
                    <label for="{{ field.id_for_label }}">{{ field.label }}</label>
                    {{ field }}
                </div>
            {% endif %}
        {% endfor %}
        <div class="row">
            <div class="col-xs-3">
                <input type="button" class="btn btn-primary" value="注  册"/>
            </div>
        </div>

    </form>
</div>
</body>

</html>
